import request from '@/utils/request'

export function createMaterial(data) {
  return request({
    url: '/admin/leaves/material/createMaterial',
    method: 'post',
    data
  })
}

export function deleteMaterial(id) {
  return request({
    url: `/admin/leaves/material/deleteMaterial/${id}`,
    method: 'delete'
  })
}

export function getMaterial(id) {
  return request({
    url: '/admin/leaves/material/getMaterial',
    method: 'get'
  })
}

export function getMaterialList(searchObj) {
  return request({
    url: '/admin/leaves/material/getMaterialList',
    method: 'post',
    data: searchObj
  })
}

export function updateMaterial(data) {
  return request({
    url: '/admin/leaves/material/updateMaterial',
    method: 'put',
    data
  })
}
